//
//  DataViewController.m
//  OneCreditTreasure
//
//  Created by iOS Grouper on 16/8/29.
//
//

#import "DataViewController.h"
#import "SecondHandCarViewController.h"//二手车贷款
@interface DataViewController (){
    UIButton *newCarButton;
    UIButton *secondCarButton;
}

@end

@implementation DataViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = LV;
    [self creatView];
    self.title = @"分期购车";
    
}

- (void)creatView{
    secondCarButton = [UIButton new];
    [self.view addSubview:secondCarButton];
    [secondCarButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(100 * AUTO_HEIGHT);
        make.left.mas_equalTo(100 * AUTO_WIDTH);
        make.height.mas_equalTo(30 * AUTO_HEIGHT);
        make.width.mas_equalTo(100 * AUTO_WIDTH);
        
    }];
    secondCarButton.backgroundColor = [UIColor redColor];
    [secondCarButton setTitle:@"二手车" forState:UIControlStateNormal];
    [secondCarButton addTarget:self action:@selector(secondCar:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)secondCar:(UIButton *)btu{
    SecondHandCarViewController *second= [SecondHandCarViewController new];
    [self.navigationController pushViewController:second animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
